<@shishuo_goods_item_tag goodsItemId="${id}" p="${p?c}">
<#include "header.ftl">
<script src="${TEMPLATE_PATH}/js/jquery-migrate-1.1.0.min.js"></script>
<link href="${TEMPLATE_PATH}/css/goodslist.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${TEMPLATE_PATH}/css/cloud-zoom.css" type="text/css">
<script src="${TEMPLATE_PATH}/js/jquery.tools.js"></script>
<script>
function listHover(){$(this).addClass('hover').siblings().removeClass('hover');}
$(function(){
	$('.hot-goods li').mouseenter(listHover);
	$("#goodslist ul li").hover(function(){							 
		$(".addcart",this).html("去淘宝购买").css("visibility","visible").stop().animate({bottom:"0px",opacity:"1"}, 300);							 
	},function(){
		$(".addcart",this).stop().animate({bottom: "-37px",opacity:"1"}, 300,function(){$(this).css("visibility","hidden")});
	});
	$("#goodslist ul li .addcart").click(function(){
		var id=$(this).attr("proid");
		var that=this;
		window.open("${basePath}/goods_redirect/"+id+".htm");
	});
	
	  $('.cloud-zoom').attr('rel','adjustX:30');
	  $(".buynow").click(function(){
		var id=$(this).attr("config");
		var num=$("#shopnum").attr("value");
		window.open("${basePath}/goods_redirect/"+id+".htm");
	 });
	 $(".addcart").click(function(){
		var id=$(this).attr("config");
		var num=$("#shopnum").attr("value");
		window.open("${basePath}/goods_redirect/"+id+".htm");
	 });
	$("#prolist").scrollable();
	$("#prolist ul li a").click(function(){
		$("#prolist ul > li a").each(function(){$(this).parent().removeClass("hover");});
		$(this).parent().addClass("hover");
		var imgurl=$(this).find("img").attr("src");
		$("#shop_big").attr("src",imgurl);
	});
	$("#shop_big").click(function(){window.open($(this).attr("src"));});
});
function showErrors(errors){
	for(var name in errors){
		$.fn.tips({type:"error",content:errors[name]});
		var ele=$("input[name='"+name+"']");
		id.validator('showMsg', ele, {
		    type: "error",
		    msg: errors[name]
		});
	}
}
function addfav(goodsId){
	$.fn.tips({type:'loading',content:'收藏中'});
	$.ajax(
	{
		url:"/user/addGoodsFavJson.json",
		type:"get",
		data:"goodsId="+goodsId,
		dataType:"json",
		success:function(data){
			var type="warn";
			if(data.result==true)
			{
				type="ok";
				$.fn.tips({type:type,content:data.msg});
			}else
			{
				showErrors(data.errors);
			}
		},
		error:function(XMLHttpRequest, textStatus, errorThrown){
			$.fn.tips({type:"error",content:XMLHttpRequest.responseText});
		}
	});
}
</script>
<script src="${TEMPLATE_PATH}/js/cloud-zoom.1.0.2.js"></script>



<div id="position">您所在的位置：<a href="/">首页</a> > <a href="/goods/${tag_goods_item.classesEntity.aliasName}.htm" title="${tag_goods_item.classesEntity.name}">${tag_goods_item.classesEntity.name}</a> > 
	<a href="/goods_item/${tag_goods_item.goodsId?c}.htm" title="${tag_goods_item.title}">${tag_goods_item.title}</a> > 正文</div>
    <div class="width">
    	<div id="goodsshow" class="mt10">
            <div class="left">
                <div class="shop_big">
	                <a href="<#if tag_goods_item.productPicUrl??>${tag_goods_item.productPicUrl}</#if>" 
	                	class="cloud-zoom" title="${tag_goods_item.title}" id='zoom1' >
	                	<img src="${basePath}/collectImg/${tag_goods_item.classesEntity.aliasName}_${tag_goods_item.goodsId?c}.jpeg" 
	                	width="350" height="350" id="shop_big" alt="${tag_goods_item.title}" title="${tag_goods_item.title}" />
	                </a>
                <div class="clear"></div>
                </div>
                <div class="shop_plist">
                    <a href="javascript:;" class="prev"></a>
                    <div id="prolist">
                        <ul>
                            <li class="hover"><a href="${tag_goods_item.productPicUrl}" 
                            rel="useZoom:'zoom1',smallImage: '${basePath}/collectImg/${tag_goods_item.classesEntity.aliasName}_${tag_goods_item.goodsId?c}.jpeg'" 
                            class="cloud-zoom-gallery"><img src="${basePath}/collectImg/${tag_goods_item.classesEntity.aliasName}_${tag_goods_item.goodsId?c}.jpeg" 
                            border="0" /></a></li> 
                        </ul>
                    </div>
                    <a href="javascript:;" class="next"></a>
                </div>
            </div>
            <div class="right">
                <h1>${tag_goods_item.title}</h1>
                <div class="intro"><p><#if tag_goods_item.description??>${tag_goods_item.description}</#if></p>
                	<!-- JiaThis Button BEGIN -->
					<div class="jiathis_style_24x24">
						<a class="jiathis_button_qzone"></a>
						<a class="jiathis_button_tsina"></a>
						<a class="jiathis_button_tqq"></a>
						<a class="jiathis_button_weixin"></a>
						<a class="jiathis_button_renren"></a>
						<a href="http://www.jiathis.com/share" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank"></a>
						<a class="jiathis_counter_style"></a>
					</div>
					<script type="text/javascript" src="http://v3.jiathis.com/code/jia.js" charset="utf-8"></script>
					<!-- JiaThis Button END -->
                </div>
                <div class="sno">商户：<a target="_blank" href="<#if tag_goods_item.productSellerUrl??>${tag_goods_item.productSellerUrl}<#else>#</#if>"><strong><#if tag_goods_item.productSellerName??>${tag_goods_item.productSellerName}</#if></strong>(点击这里去商家店铺逛逛)</a>
                </div>
                <div class="price">
                
                市场价：<del>￥${tag_goods_item.productOriginalPrice}</del> 元<br />
                会员价：<span>￥${tag_goods_item.productPrice}</span> 元<br />
                返现金：<span> ￥${tag_goods_item.productPrice*tag_goods_item.productCommission*(SYS_CALLBACK_PERCENT/100)/100}</del> 元</span><br />
                返积分：<span><#if (tag_goods_item.productGold>0)>${tag_goods_item.productGold}<#else>${tag_goods_item.productPrice*tag_goods_item.productCommission/100}</#if></del> </span><br />
                标　签：<span><#if tag_goods_item.productkeywords??> 
                		<#list tag_goods_item.productkeywords?split(",") as fileName>
                			<#if (fileName!='')>
                				<a href="/goods/search/${fileName}/">${fileName}</a>
                			</#if>
                		</#list>
                   </#if>
                   <#if tag_goods_item.classesEntity??> 
                   		<a href="/goods/search/${tag_goods_item.classesEntity.name}/">${tag_goods_item.classesEntity.name}</a>
                   </#if>		
                   <#if tag_goods_item.productPromotions??>
                   		<#if (tag_goods_item.productPromotions!='')>
                   			<a href="/goods/search/${tag_goods_item.productPromotions}/">${tag_goods_item.productPromotions}</a>
                   		</#if>
                   </#if>
                 </span>
                
                </div>
                <div class="cart">
                    <div class="cart_num"><div class="amount">
                    <span>数量：</span><input type="text" value="1" name="shopnum" id="shopnum" class="shopnum" proid="13" 
                    onKeyUp="value=value.replace(/[^\d]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" />
                    <span class="uamount shopadd"></span><span class="damount shopminus"></span><span class="clear"></span>
                    </div><div class="soldnum">已售出<u>${tag_goods_item.productSellTotal}</u>件<div class="soldnum">库存<u>${tag_goods_item.productSellTotal*2}</u>件</div></div></div>
                    <div class="cart_bnt"><input type="button" value="去<#if (tag_goods_item.productFrom==0)>天猫</#if><#if (tag_goods_item.productFrom==1)>京东</#if>抢购" class="buynow" config="${tag_goods_item.goodsId}" /> 
                    <input type="button" value="加入购物车" class="addcart" id="addcart" config="${tag_goods_item.goodsId}" /> 
                    <input type="button" value="加入收藏夹" class="addfav" onClick="addfav(${tag_goods_item.goodsId})" /></div>
                </div>
            </div>
            <div class="clear"></div>
        </div>
    </div>
    
    <div class="width" id="container">
        <div class="subject mt10"><ul><li class="hover" id="one1" onClick="setTab('one',1,3)">商品介绍</li>
        <li id="one2" onClick="setTab('one',2,3)">商品评论(<em id="commentnum">1</em>)</li>
        <li id="one3" onClick="setTab('one',3,3)">购买评价(<em id="scorenum">0</em>)</li>
        </ul></div>
        <div class="border p10">
           <div id="con_one_1">
	       <div id="goodslist">
		    	<@shishuo_goods_item_list_tag aliasName="${tag_goods_item.classesEntity.aliasName}" p="1"  orderNum="3">
		    		<ul>
		                <#list tag_goods_item_list.list as goods>
				    		<li>
					    		<a target="_blank" href="${basePath}/goods_redirect/${goods.goodsId?c}.htm" title="${goods.title}">
					    		<img src="${basePath}/collectImg/${tag_goods_item.classesEntity.aliasName}_${goods.goodsId?c}.jpeg" width="200" 
					    		height="200" border="0" alt="${goods.title}" />
					    		<div class="name">${goods.title}</div>
					    		<div class="price">市场价：<del>￥${goods.productOriginalPrice}</del> 元<br>
					    		会员价：<span>￥${goods.productPrice}</span> 元<br>
					    		返现金：<span>￥${goods.productPrice*goods.productCommission*(SYS_CALLBACK_PERCENT/100)/100}</span> 元<br>
					    		返积分：<span>${goods.productPrice*goods.productCommission/100}</span></div>
					    		</a>
					    		<a href="${basePath}/goods_item/${goods.goodsId?c}.htm" title="${goods.title}">
					    			<div class="title">${goods.title}</div>
					    		</a>
					    		<div class="isbuy"><span><#if goods.productOriginalPrice==0>0<#else>${goods.productPrice*10/goods.productOriginalPrice}</#if></span>折，已有<span>${goods.productSellTotal}</span>人购买</div>
					    		<div class="addcart" proid="${goods.goodsId?c}">去淘宝购买</div>
				    		</li>
				    	</#list>
		            </ul>
		            <div class="clear"></div>
		    	 </@shishuo_goods_item_list_tag>
		    </div>
           
           <#if tag_goods_item.productPicUrl??><img src='${tag_goods_item.productPicUrl}'/></#if>
           						<#if tag_goods_item.content??>${tag_goods_item.content}</#if></div>
           <div id="con_one_2" class="dis"><div id="comment_staus"></div><div id="commenttop"></div></div>
           <div id="con_one_3" class="dis"><div id="scoretop"></div></div>
           <div id="con_one_4" class="dis">
	           <div id="scoretop">
					<@shishuo_custom_tag_html_tag isRandomHtml="true" keywords="${tag_goods_item.title},${tag_goods_item.productPromotions}">
						<#if tag_html_value??>${tag_html_value}</#if>
					</@shishuo_custom_tag_html_tag>
				</div>
			</div>
           <div class="clear"></div>
        </div>
    </div>
</@shishuo_goods_item_tag>
<#include "footer.ftl">